package com.neuedu.mblog.controller.admin;

import com.neuedu.mblog.controller.BaseController;
import com.neuedu.mblog.entiry.Comment;
import com.neuedu.mblog.entiry.User;
import com.neuedu.mblog.service.CommentService;
import com.neuedu.mblog.service.UserService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;

/**
 * 项目：mblog_java4
 * 创建时间：  2021-12-29   9:19
 * 作者 :jshand
 * 描述 : 栏目的后台管理系统
 * /admin/chanel
 *
 * http://localhost/mblog/admin/user
 * http://localhost/mblog/admin/user?_type=list
 */
@WebServlet(urlPatterns = "/admin/user")
public class AdminUserController extends BaseController {
    private UserService userService = new UserService();
    @Override
    protected void list(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {
        List<User> list = userService.selectList(request);
        request.setAttribute("list",list);
        request.getRequestDispatcher("/WEB-INF/view/admin/user/user_list.jsp").forward(request,response);

    }

}
